﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Suteki.Common.Repositories;
using BulletOnRails4NET.Models;
using System.Data.Linq;
using GeneCMS.Models.physical;

namespace ClubDataRegister.Models.logical
{
    public class CmsRepositoryFactory : RepositoryFactory
    {

        public CmsRepositoryFactory()
        {
        }

        public void InitializeClubDataRepository()
        {
        }

        public void InitializeDataContext()
        {
            //RepositoryDataContext = new ClubsDataContext();
        }
        public override DataContext GetNewDataContext()
        {
            return new CMSDBDataContext();
        }
        /// <summary>
        /// Needs to be called after the DataContext has been initialized
        /// </summary>
        public void InitializeGenericRepositories()
        {
            Repositories = new Dictionary<string, IRepository>();
            //To be customized for every app
            Repositories.Add("Page", new Repository<Page>());
            Repositories.Add("Content", new Repository<Content>());
            Repositories.Add("Website", new Repository<Website>());
            //Repositories.Add("GeneratedPage", new Repository<GeneratedPage>());
            Repositories.Add("Menu", new Repository<Menu>());
            Repositories.Add("Usr", new Repository<Usr>());
        }
    }
}
